﻿<UserControl x:Class="Restaurant.Reservations.UserControls.ucDateTimeUpDown"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d">
    <Grid>
        <Border BorderBrush="Black" BorderThickness=".25" />
        <StackPanel Orientation="Horizontal">


            <TextBlock x:Name="AddHoursTextBox"
                       MinWidth="20"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Center"
                       Text="{Binding DisplayTimeHours,
                                      Mode=OneWay}"
                       TextAlignment="Center" />
            <StackPanel HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Orientation="Vertical">
                <Button x:Name="HourUpButton" Click="HourUpButton_OnClick">
                    <Button.Template>
                        <ControlTemplate TargetType="Button">
                            <Border BorderBrush="Black" BorderThickness=".25">
                                <Viewbox Width="10" Height="10">
                                    <Image Source="{StaticResource UpImage}" />
                                </Viewbox>
                            </Border>
                        </ControlTemplate>
                    </Button.Template>
                </Button>

                <Button x:Name="HourDownButton"
                        Margin="0,-1,0,0"
                        Click="HourDownButton_OnClick">
                    <Button.Template>
                        <ControlTemplate TargetType="Button">
                            <Border BorderBrush="Black" BorderThickness=".25">
                                <Viewbox Width="10" Height="10">
                                    <Image Source="{StaticResource DownImage}" />
                                </Viewbox>
                            </Border>
                        </ControlTemplate>
                    </Button.Template>
                </Button>
            </StackPanel>
            <TextBlock Margin="3,0,0,0"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Center"
                       Text="h." />
            <TextBlock Margin="3,0,0,0"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Center"
                       Text=":"
                       TextAlignment="Center" />
            <TextBlock x:Name="AddMinutesTextBox"
                       MinWidth="20"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Center"
                       Text="{Binding DisplayTimeMinutes,
                                      Mode=OneWay}"
                       TextAlignment="Center" />


            <StackPanel HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Orientation="Vertical">
                <Button x:Name="MinutesUpButton" Click="MinutesUpButton_OnClick">
                    <Button.Template>
                        <ControlTemplate TargetType="Button">
                            <Border BorderBrush="Black" BorderThickness=".25">
                                <Viewbox Width="10" Height="10">
                                    <Image Source="{StaticResource UpImage}" />
                                </Viewbox>
                            </Border>
                        </ControlTemplate>
                    </Button.Template>
                </Button>

                <Button x:Name="MinutesDownButton"
                        Margin="0,-1,0,0"
                        Click="MinutesDownButton_OnClick">
                    <Button.Template>
                        <ControlTemplate TargetType="Button">
                            <Border BorderBrush="Black" BorderThickness="0.25">
                                <Viewbox Width="10" Height="10">
                                    <Image Source="{StaticResource DownImage}" />
                                </Viewbox>
                            </Border>
                        </ControlTemplate>
                    </Button.Template>
                </Button>
            </StackPanel>
            <TextBlock Margin="3,0,3,0"
                       HorizontalAlignment="Center"
                       VerticalAlignment="Center"
                       Text="m." />

            <ComboBox x:Name="AmPmComboBox"
                      MinWidth="45"
                      HorizontalAlignment="Center"
                      VerticalAlignment="Center"
                      BorderThickness=".25"
                      ItemsSource="{Binding AmPmTypes}"
                      SelectedItem="{Binding DisplayAmPm}" />
        </StackPanel>


    </Grid>
</UserControl>